nested defaultdict of defaultdict - python